import { ref, computed } from "vue";
import { defineStore } from "pinia";

export const useUserStore = defineStore(
  "user",
  () => {
    const userInfo = ref(null);
    const setUserInfo = (val) => {
      userInfo.value = val;
    };

    return { userInfo, setUserInfo };
  },
  {
    persist: {
      storage: sessionStorage,
    },
  }
);
